﻿<%@ Page Language="C#" MasterPageFile="~/webAdminNoButtonRow.master" AutoEventWireup="true"
    CodeBehind="findUsers.aspx.cs" Inherits="Salient.Web.Administration.Security.Users.findUsers" %>
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="titleBar">
    Find Users
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="content">
    <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:Instructions %>" />
    <table cellspacing="0" cellpadding="5" class="lrbBorders" width="750">
        <tr>
            <td class="callOutStyle">
                <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:SearchUsers %>" />
            </td>
        </tr>
        <tr>
            <td class="bodyTextLowTopPadding">
                <asp:Literal ID="Literal3" runat="server" Text="<%$ Resources:SearchBy %>" />
                <asp:DropDownList runat="server" ID="dropDown1">
                    <asp:ListItem runat="server" id="item1" Text="<%$ Resources:Username %>">
                    </asp:ListItem>
                    <asp:ListItem runat="server" id="item2" Text="<%$ Resources:EMail %>">
                    </asp:ListItem>
                </asp:DropDownList>
                &nbsp;&nbsp;
                <asp:Literal ID="Literal4" runat="server" Text="<%$ Resources:For %>" />
                <asp:TextBox runat="server" ID="textBox1" />
                <asp:Button ID="Button1" runat="server" Text="<%$ Resources:FindUser %>" OnClick="SearchForUsers" />
                <br />
                <asp:Label runat="server" ID="alphabetInfo" Text="<%$ Resources:GlobalResources,AlphabetInfo %>" /><br />
                <asp:Repeater runat="server" ID="alphabetRepeater" OnItemCommand="RetrieveLetter">
                    <ItemTemplate>
                        <asp:LinkButton runat="server" ID="linkButton1" CommandName="Display" CommandArgument="<%#Container.DataItem%>"
                            Text="<%#Container.DataItem%>" />
                        &nbsp;
                    </ItemTemplate>
                </asp:Repeater>
            </td>
    </table>
    <br />
    <table cellspacing="0" cellpadding="0" border="0" id="hook" width="750">
        <tbody>
            <tr align="left" valign="top">
                <td width="62%" height="100%" class="lrbBorders">
                    <asp:Label runat="server" ID="noUsers" class="bodyTextNoPadding" EnableViewState="false"
                        Visible="false">&nbsp;<asp:Literal ID="Literal5" runat="server" Text="<%$ Resources:NoUsersCreated %>" /></asp:Label>
                    <asp:Label runat="server" ID="notFoundUsers" class="bodyTextNoPadding" EnableViewState="false"
                        Visible="false">&nbsp;<asp:Literal ID="Literal6" runat="server" Text="<%$ Resources:NotFoundUsers %>" /></asp:Label>
                    <asp:GridView runat="server" ID="dataGrid" Width="100%" CellSpacing="0" CellPadding="5"
                        border="0" AutoGenerateColumns="False" AllowPaging="true" PageSize="7" OnPageIndexChanging="IndexChanged"
                        UseAccessibleHeader="true">
                        <RowStyle CssClass="gridRowStyle" />
                        <AlternatingRowStyle CssClass="gridAlternatingRowStyle" />
                        <PagerStyle CssClass="gridPagerStyle" />
                        <PagerSettings Mode="Numeric" />
                        <HeaderStyle CssClass="callOutStyle" Font-Bold="true" />
                        <SelectedRowStyle CssClass="gridSelectedRowStyle" />
                        <Columns>
                            <asp:TemplateField>
                                <ItemStyle HorizontalAlign="center" />
                                <ItemTemplate>
                                    <asp:CheckBox runat="server" ID="checkBox1" OnCheckedChanged="SelectedChanged" AutoPostBack="true"
                                        Checked='<%#UserCollection[DataBinder.Eval(Container.DataItem, "UserName")] != null%>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField runat="server" HeaderText="<%$ Resources:Username %>">
                                <ItemTemplate>
                                    <asp:Label runat="server" ID="userNameLabel" ForeColor='black' Text='<%# DataBinder.Eval(Container.DataItem, "UserName")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField runat="server" HeaderText="<%$ Resources:EmailAddress %>">
                                <ItemTemplate>
                                    <asp:Label runat="server" ID="email" ForeColor='black' Text='<%#DataBinder.Eval(Container.DataItem, "Email")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                    <div align="right">
                        <asp:Button ID="Button2" runat="server" OnClick="OK_Click" Text="<%$ Resources:OK %>"
                            Width="75" />
                        <asp:Button ID="Button3" runat="server" OnClick="Cancel_Click" Text="<%$ Resources:Cancel %>"
                            Width="75" />
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
    <%-- Cause the textbox to submit the page on enter, raising server side onclick--%>
    <input type="text" style="visibility: hidden" />
</asp:Content>
